package com.xing.common.result;

import lombok.Getter;

/**
 * 统一返回结果状态信息
 *
 * @author: xingfuhao
 * @create: 2022-04-26 21:03
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    FAIL(201, "失败"),
    PARAM_ERROR(202, "参数不正常"),
    SERVICE_ERROR(203, "服务异常"),
    DATA_ERROR(204, "数据异常"),

    LOGIN_AUTH(208, "未登录"),
    PERMISSION(209, "没有权限"),


    CODE_ERROR(210, "验证码错误"),
    LOGIN_DISABLED_ERROR(212, "该手机号已被禁用"),
    CANCEL_ORDER_FAIL(225,"取消订单失败"),
    TIME_NO(250, "当前时间不可以预约"),
    CANCEL_ORDER_NO(255, "不能取消预约"),


    SIGN_ERROR(300, "签名错误");


    private Integer code;
    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
